package com.ck.datacenter.plus.controller;

import com.ck.datacenter.log.annotation.CkOperatedLog;
import com.ck.datacenter.plus.service.PlusService;
import com.ck.datacenter.plus.vo.Zdb;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "mybatis-plus测试类")
@RestController
@RequestMapping("/plus")
public class PlusController {

    @Autowired
    private PlusService plusService;

    @ApiOperation("测试方法test")
    @RequestMapping(path = "/test", method = RequestMethod.GET)
    public List<Zdb> test() {
        return plusService.findZdbList();
    }

    @ApiOperation("测试方法test2")
    @CkOperatedLog(module = "test", operation = "find", description = "查询test2接口", param = "'zdmc='+#vo.zdmc")
    @RequestMapping(path = "/test2", method = RequestMethod.POST)
    public void test2(@RequestBody Zdb vo) {

    }

}

